<script lang="ts">
	import Vue from 'vue';
	export default Vue.extend({
		mpType: 'app',
		onLaunch() {
			console.log('App Launch')

			const storeState = uni.getStorageSync('storeKey');
			if (!!storeState) {
				this.$store.replaceState(Object.assign({}, this.$store.state, storeState))
			}
		},
		onShow() {
			console.log('App Show')
			uni.removeStorageSync('storeKey');
		},
		onHide() {
			console.log('App Hide')
			uni.setStorageSync('storeKey', this.$store.state)
		}
	});
</script>

<style lang="scss">
	@import "./static/css/index.scss";
	@import "@/static/css/iconfont.css";
</style>
